﻿@model WebView.Models.RegisterViewModel
@{
    ViewBag.Title = "创建用户";
    Layout = "~/Views/Shared/admin_Layout.cshtml";
}

@using (Html.BeginForm("Create", "UsersAdmin", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()    //创建防伪标记
                                <hr />
                                @Html.ValidationSummary("", new { @class = "text-error" })
                                <div class="form-group">
                                    @Html.LabelFor(model => model.Email, new { @class = "col-md-2 control-label" })
                                    <div class="col-md-10">
                                        @Html.TextBoxFor(model => model.Email, new { @class = "form-control" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    @Html.LabelFor(model => model.Password, new { @class = "col-md-2 control-label" })
                                    <div class="col-md-10">
                                        @Html.PasswordFor(model => model.Password, new { @class = "form-control" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    @Html.LabelFor(model => model.ConfirmPassword, new { @class = "col-md-2 control-label" })
                                    <div class="col-md-10">
                                        @Html.PasswordFor(model => model.ConfirmPassword, new { @class = "form-control" })
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="col-md-2 control-label">
                                        编辑用户角色
                                    </label>
                                    <div class="col-md-10">
                                        @foreach (var item in (SelectList)ViewBag.RoleId)
                                        {
                                            <input type="checkbox" name="SelectedRoles" value="@item.Value" class="checkbox-inline" />
                                            @Html.Label(item.Value, new { @class = "control-label" })
                                        }
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-md-offset-2 col-md-10">
                                        <input type="submit" class="btn btn-default" />
                                    </div>
                                </div>
}

<div>
    @Html.ActionLink("返回用户列表", "Index")
</div>

@section Scripts{
    @Scripts.Render("~/bundles/jqueryval")
}

<!--[if !IE]> -->
<script src="~/Scripts/jquery-2.1.4.min.js"></script>
<!-- <![endif]-->
<!--[if IE]>
<script src="/Scripts/jquery-1.11.3.min.js"></script>
<![endif]-->

<script type="text/javascript">
$(function () {
    $(".nav-list>li:eq(2)").addClass("active open").siblings().removeClass("active");
    $(".submenu:eq(1)>li:eq(0)").addClass("active").siblings().removeClass("active");
})
</script>